cmake_minimum_required(VERSION 2.8.3)
project(topic_example)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  geometry_msgs
  roscpp
  std_msgs
  serial
  moveit_ros_planning_interface
)



catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES topic_example
#  CATKIN_DEPENDS roscpp std_msgs
#  DEPENDS system_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
# include
  ${catkin_INCLUDE_DIRS}
)



add_executable(sub_node src/sub_node.cpp 
			    src/mbot_linux_serial.cpp)
target_link_libraries(sub_node ${catkin_LIBRARIES})

add_executable(receive_node src/receive_node.cpp 
			    src/mbot_linux_serial.cpp)
target_link_libraries(receive_node ${catkin_LIBRARIES})

add_executable(interchange_node src/interchange_node.cpp 
			    src/mbot_linux_serial.cpp)
target_link_libraries(interchange_node ${catkin_LIBRARIES})

add_executable(listener_sub src/listener_sub.cpp)  
target_link_libraries(listener_sub ${catkin_LIBRARIES})

add_executable(listener_pub src/listener_pub.cpp)  
target_link_libraries(listener_pub ${catkin_LIBRARIES})



# catkin_install_python(PROGRAMS
#   scripts/mbot_linux_serial.py
#   scripts/publish_joint.py
#   scripts/sendjoint_node.py
#   DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )